from selenium import webdriver
from time import sleep
from selenium.webdriver.common.by import By
from selenium.webdriver.support.select import Select

test=webdriver.Chrome()
test.get(r"C:\Path\example.html")
sleep(3)
#alter 弹出框
test.find_element(By.NAME,"alterbutton").click()
test.switch_to.alert.accept()
# test.switch_to.alert.dismiss()
# test.switch_to.alert.send_keys()
# test.switch_to.alert.text()
sleep(2)






test.quit()